package com.wmh.baseservice.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.Version;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * @author mmx generator
 * @since 2021-10-22
 */
@ApiModel(value = "AdMenu对象", description = "管理员-菜单")
@Data
@Accessors(chain = true)
public class AdMenu implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "菜单名称")
    private String menuName;

    @ApiModelProperty(value = "权限标识")
    private String permissions;

    @ApiModelProperty(value = "菜单路由或接口路径")
    private String requestUrl;

    @ApiModelProperty(value = "菜单图标")
    private String menuIcon;

    @ApiModelProperty(value = "父级id")
    private Long parentId;

    @ApiModelProperty(value = "对应的组件")
    private String component;

    @ApiModelProperty(value = "标记:  1-菜单   2-接口")
    private Integer flag;

    @ApiModelProperty(value = "排序,   值越大排越前")
    private Integer sort;

    private Boolean keepAlive;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "版本")
    @Version
    private Integer version;

    public static final String ID = "id";

    public static final String PERMISSIONS = "permissions";

    public static final String MENU_NAME = "menu_name";

    public static final String REQUEST_URL = "request_url";

    public static final String MENU_ICON = "menu_icon";

    public static final String PARENT_ID = "parent_id";

    public static final String COMPONENT = "component";

    public static final String FLAG = "flag";

    public static final String SORT = "sort";

    public static final String KEEP_ALIVE = "keep_alive";

    public static final String UPDATE_TIME = "update_time";

    public static final String CREATE_TIME = "create_time";

    public static final String VERSION = "version";
}